home *** CD-ROM | disk | FTP | other *** search
- /*
- File: CAS_Extra.h
-
- Contains: Constants and public function prototypes for CAS_Extra.c
-
- Written by: Rick Badertscher
-
- Copyright © 1993-1995 ComponentWorks, All rights reserved.
-
- Change History (most recent first):
-
- <5> 05/13/95 RB Added CAUtil_IsCALibPresent()
- <4> 04/01/95 RB Added CAWindowActivateHandler()
- <3> 03/30/95 RB Added App_CAFocusLostProc() and App_CAFocusAquiredProc()
-
- <2> 03/16/95 RB Added Read/Write Wrappers and CASaveDlgHook to
- facilitate the Bento storage model
-
- <1> 02/21/95 RB Created.
-
- */
-
- #if !defined(_H_CAS_Extra)
- #define _H_CAS_Extra
-
- #include "CAS_Types.h"
-
- // CustomGetFile dialog defines (Used by CA version for save dialog)
-
- #define kCASaveFileDialog 500
- #define kNativeRadioItemID 13
- #define kBentoRadioItemID 14
-
- // These are the values returned in the CustomPutFile userData.
-
- #define kNativeStorageModel 0
- #define kBentoStorageModel 1
-
-
- enum
- {
- fileStream = 0,
- memoryStream = 1
- };
-
- struct IOStream
- {
- short type; // 0 - file, 1 - buffer
- DocPtr theDoc;
- short fileRef;
- Ptr buffer;
- } ;
-
- #if defined(__cplusplus)
- extern "C"
- {
- #endif
-
- // CA Callbacks
-
-
- void App_CAErrorHandler ( OSErr err, char* mesg);
-
-
- void App_CASelectWindowProc( WindowPtr window );
- void App_CAFocusAcquiredProc( CADocumentRef, CAFocusType );
- void App_CAFocusLostProc( CADocumentRef, CAFocusType );
- void App_CAWindowActivateHandler( WindowPtr theWindow, Boolean activating);
- Boolean App_CAAdjustBorderHandler( CADocumentRef, CAFrameRef, RgnHandle);
-
- WindowPtr App_CAAllocWindowRecProc( CAWindowLayer windowLayer );
- WindowPtr App_CAFrontWindowProc( CAWindowLayer windowLayer );
- Boolean App_CAIsFloaterProc( WindowPtr window );
- void App_CADisposeWindowRecProc( WindowPtr window );
-
-
- pascal Boolean App_CAFrameShapeRequestHandler( CADocumentRef document,
- CAFrameRef frameRef,
- RgnHandle rgn);
-
- OSErr CAUtil_ShutdownCALib();
- OSErr CAUtil_InitCALib();
-
- // Misc. utiltities
-
- // For dragging native content to/from the finder
- void CAUtil_CreateDocFileFromSelection ( DocPtr theDoc, FSSpecPtr fsSpec);
- OSErr CAUtil_AddItemsFromDocFile( DocPtr theDoc, FSSpecPtr fsSpec, Point* origin);
-
-
- Boolean CAUtil_HandleMouseDownBorder ( EventRecord* theEvent,
- CAEventInfo* eventInfo);
- Boolean CAUtil_HandleMouseUpEmbedded ( EventRecord* theEvent,
- CAEventInfo* eventInfo);
-
- Boolean CAUtil_HandleMouseDownEmbedded ( EventRecord* theEvent,
- CAEventInfo* eventInfo);
-
- void CAUtil_RecalcSelRgns( DocPtr theDoc);
- void CAUtil_InvalSelRgns ( DocPtr theDoc);
-
- DocPtr CAUtil_GetDocPtr ( CADocumentRef document);
-
- // Data transfer utiltities
-
- void CAUtil_EmbedODContainerFromCADocument( DocPtr theDoc,
- CADocumentRef document,
- Point location);
-
- Boolean CAUtil_ScrapHasType ( ResType type, long* scrapOffset, long* length);
- void CAUtil_InsertMenu( WindowPtr theWindow);
- void CAUtil_PartInfoMenu ( DocPtr theDoc);
- void CAUtil_OpenSelectionMenu ( WindowPtr theWindow);
-
- // Read/Write wrappers for CASample - Write to a file stream or a OD stream
-
- OSErr CAUtil_ReadWrapper ( IOStreamPtr ioStream, Ptr buffer, long* length);
- OSErr CAUtil_WriteWrapper ( IOStreamPtr ioStream, Ptr buffer, long* length);
- OSErr CAUtil_WriteTo( CADocumentRef doc, Ptr buffer, long* length);
-
- Boolean CAUtil_IsCALibPresent ();
-
- pascal short CASaveDialogHook (short item, DialogPtr theDialog, void* userData);
-
-
- #if defined(__cplusplus)
- }
- #endif
-
-
- #endif
-